/**
 * Created by zen on 15-12-23.
 */
var express = require('express');
var app = express();

var myLogger = function(req,res,next){
    console.log('LOGGED');
    next();
};

var requestTime = function(req,res,next) {
    req.requestTime = Date.now();
    next();
}

app.use(myLogger);
app.use(requestTime);


app.get('/', function(req,res,next){
    responseText = "hello world";
    responseText += "\nrequest at: " + req.requestTime+'';
    //res.send(responseText);
    res.sendfile('/home/zen/works/node-express/ejs2/tcpdf_6_2_12.zip');

});

app.listen(3002);
